﻿@{
    ViewBag.Title = "MailManagement";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}


@section scripts
{
    <script src="~/Scripts/App/Admin/mail_manager.js"></script>
}

<div class="content-header">
    <div class="header-section">
        <h1>
            <i class="gi gi-certificate"></i>Quản Lý Mẫu Email<br>
            <small>Email thông báo đăng ký thành công</small>
        </h1>
    </div>
</div>
<ul class="breadcrumb breadcrumb-top">
    <li><a href="../Admin/index"><i class="fa fa-home"></i></a></li>
    <li><a href="../Admin/ListAdvertise">Email</a></li>
    <li><a href="../Admin/AddAdvertise">Quản lý</a></li>
</ul>
<div class="block block-alt-noborder" id="top-addad">
    <div class="row">
        <div class="col-sm-9">
            <div id="editMailFormat">
                <form class="form-horizontal form-bordered" novalidate="novalidate" data-bind="submit: $root.doUpdate">
                    <div class="form-group">
                        <label for="val_title" class="col-md-2 control-label">Loại Email<span class="text-danger">*</span></label>
                        <div class="col-md-10">
                            <div class="input-group">
                                <select id="val_type" name="val_type" class="select-chosen" data-placeholder="Chọn loại email..." data-bind="options: Types, optionsValue: 'id', optionsText: 'name', value: SelectedType, chosen: true, event: { change: $root.doChange }">
                                </select>
                                <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="val_title" class="col-md-2 control-label">Tiêu đề mail<span class="text-danger">*</span></label>
                        <div class="col-md-10">
                            <div class="input-group">
                                <input type="text" placeholder="Chứa ít nhất 2 ký tự..." data-bind="value: Subject" class="form-control" name="val_title" id="val_title">
                                <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="val_title" class="col-md-2 control-label">Nội dung mail<span class="text-danger">*</span></label>
                        <div class="col-md-10">
                            <div class="input-group">
                                <textarea rows="7" placeholder="Chứa ít nhất 2 ký tự..." class="form-control ckeditor" id="mail_body" name="val_body" id="val_body"></textarea>
                                <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-actions form-group">
                        <div class="col-md-10 col-md-offset-2">
                            <button class="btn btn-sm btn-primary" id="btn_submit" type="submit">Lưu thay đổi</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="col-sm-3">
            <p><strong>UserName: </strong>#tb{UserName}</p>
            <p><strong>Email: </strong>#tb{Email}</p>
        </div>
    </div>
</div>
